#ifndef PIXEL_H
#define PIXEL_H
#include <stdint.h>
#include "common.h"
typedef enum pix_fmt{
    PIX_FMT_YUV420P = 0,
    PIX_FMT_BUTT,
}pix_fmt_e;


typedef struct plane_ptr{
    uint8_t *y_data;
    uint8_t *u_data;
    uint8_t *v_data;
}plane_ptr_t;

void plane_copy_interleave(uint8_t *dst, uint8_t *src_u, uint8_t *src_v, int width, int height);

void plane_copy_deinterleave( uint8_t *dst_a, int i_dsta, uint8_t *dst_b, int i_dstb,
                                    uint8_t *src,  int i_src, int width, int height );

int x264_pixel_satd_8x8(pixel *pix1, int i_pix1, pixel *pix2, int i_pix2);
int x264_pixel_satd_16x16(pixel *pix1, int i_pix1, pixel *pix2, int i_pix2);
#endif